package springannotaion.compment22;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.stereotype.Component;
import springannotaion.bean.E2;

/**
 * @author sss
 * @date 2020-02-18 19:28
 **/
public class ImportBeanDefinitionRegistrar1 implements ImportBeanDefinitionRegistrar {
	@Override
	public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
		System.out.println("******ImportBeanDefinitionRegistrar1********");
		RootBeanDefinition beanDefinition = new RootBeanDefinition(E2.class);
		registry.registerBeanDefinition("E2",beanDefinition);
	}
}
